<h1>Admin Menu</h1>
<?php
	foreach ($GLOBALS['moddirlist'] as $v) {
		if (is_dir("./modules/".$v) && preg_match('/^([A-Z]|[a-z]|_)/',$v) && $v != 'template') {
			if (function_exists($v.'_adminMenu')) {
				$stack = call_user_func($v.'_adminMenu', $translate);
				echo "<h3><a class=\"toggle\" href=\"#\">" . array_shift($stack) . "</a></h3>\n";
				echo "<div id=\"" . $v . "menu\">\n";
				echo "<ul>\n";
				foreach ($stack as $k => $v2) {
					echo "<li><a href=\"index.php?mod=$v&$k\">$v2</a></li>";
				}
				echo "</ul>\n";
				echo "</div>\n";
			}
		}
	}
?>